﻿
function CheckLogin() {
    $.ajax({
        url: "/Login/CheckLogin",
        type: 'POST',
        dataType: 'JSON',
        data: {
            userName: $("#userName").val(),
            pwd: $("#pwd").val(),
        },
        success: function (data) {
            if (data.flag) {
                window.location.href = "/MainPage/Index";
            } else {
                layer.alert(data.msg);
            }


        },
        error: function () {
            layer.alert("系统错误");
        }
    });
};
